package com.love.travel.service.impl;

import java.util.List;
import com.love.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.love.travel.mapper.TravelProductTagMapper;
import com.love.travel.domain.TravelProductTag;
import com.love.travel.service.ITravelProductTagService;

/**
 * 产品-标签关联Service业务层处理
 * 
 * @author love
 * @date 2025-10-23
 */
@Service
public class TravelProductTagServiceImpl implements ITravelProductTagService 
{
    @Autowired
    private TravelProductTagMapper travelProductTagMapper;

    /**
     * 查询产品-标签关联
     * 
     * @param id 产品-标签关联主键
     * @return 产品-标签关联
     */
    @Override
    public TravelProductTag selectTravelProductTagById(Long id)
    {
        return travelProductTagMapper.selectTravelProductTagById(id);
    }

    /**
     * 查询产品-标签关联列表
     * 
     * @param travelProductTag 产品-标签关联
     * @return 产品-标签关联
     */
    @Override
    public List<TravelProductTag> selectTravelProductTagList(TravelProductTag travelProductTag)
    {
        return travelProductTagMapper.selectTravelProductTagList(travelProductTag);
    }

    /**
     * 新增产品-标签关联
     * 
     * @param travelProductTag 产品-标签关联
     * @return 结果
     */
    @Override
    public int insertTravelProductTag(TravelProductTag travelProductTag)
    {
        travelProductTag.setCreateTime(DateUtils.getNowDate());
        return travelProductTagMapper.insertTravelProductTag(travelProductTag);
    }

    /**
     * 修改产品-标签关联
     * 
     * @param travelProductTag 产品-标签关联
     * @return 结果
     */
    @Override
    public int updateTravelProductTag(TravelProductTag travelProductTag)
    {
        return travelProductTagMapper.updateTravelProductTag(travelProductTag);
    }

    /**
     * 批量删除产品-标签关联
     * 
     * @param ids 需要删除的产品-标签关联主键
     * @return 结果
     */
    @Override
    public int deleteTravelProductTagByIds(Long[] ids)
    {
        return travelProductTagMapper.deleteTravelProductTagByIds(ids);
    }

    /**
     * 删除产品-标签关联信息
     * 
     * @param id 产品-标签关联主键
     * @return 结果
     */
    @Override
    public int deleteTravelProductTagById(Long id)
    {
        return travelProductTagMapper.deleteTravelProductTagById(id);
    }
}
